package com.ruoyi.web.controller.server;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.dto.StatisticsParamDTO;
import com.ruoyi.system.service.impl.EmWarningServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author : yangcan
 * @date : 2023/3/20 10:55
 */
@Slf4j
@RestController
@RequestMapping("/statistics")
public class EmStatisticsController {
    @Autowired
    private EmWarningServiceImpl warningService ;

    @PostMapping("/getStatisticsInfo")
    public AjaxResult getStatisticsInfo(@RequestBody StatisticsParamDTO dto){
        Map<String,Object> map = warningService.getStatisticsInfo(dto) ;
        return AjaxResult.success(map) ;
    }
}
